import "@/common/css/global.css";

import { createSSRApp} from "vue";
import App from "./App.vue";

import * as Pinia from 'pinia'
import {createUnistorage} from 'pinia-plugin-unistorage'
const store = Pinia.createPinia()
store.use(createUnistorage())

import uviewPlus from 'uview-plus'

import Http from "@/common/http"

export function createApp() {
  const app = createSSRApp(App);
  
  app
  .use(store)
  .use(uviewPlus)
  .use(Http)
  
  uni.$u.setConfig({
  	config: {
  		unit: 'rpx',
  	}
  })
  
  return {
    app,
	Pinia
  };
}
